package derek.sun;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class WebChecker {
	public static String getPageSource(String urlvalue) {
		String inputLine = "";
		String line2 = "";
		try {
			URL url = new URL(urlvalue);
			HttpURLConnection urlConnection = (HttpURLConnection) url
					.openConnection();
			BufferedReader in = new BufferedReader(new InputStreamReader(
					urlConnection.getInputStream()));
			while ((line2 = in.readLine()) != null) {
				inputLine += line2;
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return inputLine;
	}
}
